﻿@model IEnumerable<VOD.Models.Video>
@using VOD.Helpers;
@if (Model.Count() > 0)
{
    bool isFirst = true;
    @:<div class="rank">
        <h4>排行榜</h4>
        foreach (var video in Model)
        {
            if (isFirst)
            {
                <dl class="topFirst">
                    <dt>
                        <a href="@Url.Action("Play", "Video", new {id=video.VideoID })">
                            <img width="60" height="80" src="@Url.Content("~/Content/Images/VideoImg/"+video.VideoID+".jpg")" />
                        </a>
                    </dt>
                    <dd>
                        <b><a href="@Url.Action("Play", "Video", new {id=video.VideoID })">@video.Name</a></b>
                        <p>主演：@Html.Truncate(video.Actor, 7)</p>
                        <p>点播数: @video.PlayRecords.Count</p>
                    </dd>
                </dl>
                @:<ul class="topList">
                isFirst = false;
            }
            else{
                <li><span class="num">@video.PlayRecords.Count</span><a href="@Url.Action("Play", "Video", new {id=video.VideoID })">@video.Name</a></li>
            }
        }
            @:</ul>
    @:</div>
}
